Change transformers.onnx to use optimum.exporters.onnx#20529
Change transformers.onnx to use optimum.exporters.onnx#20529michaelbenayoun merged 15 commits intohuggingface:mainfrom
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
sgugger
left a comment
There was a problem hiding this comment.
Thanks for iterating! This looks great, I just have two last comments.
src/transformers/onnx/__main__.py
Outdated
There was a problem hiding this comment.
Here I think we should issue a proper deprecation warning with warnings.warn(xxx, FutureWarning)
src/transformers/onnx/__main__.py
Outdated
There was a problem hiding this comment.
Can we add an or not is_optimum_available() here? I'd like to avoid the code failing when optimum is not installed, and there will be a big deprecation warning if you accept the suggestion above :-)
lewtun
left a comment
There was a problem hiding this comment.
Thanks for integrating optimum into the ONNX exporter @michaelbenayoun - this looks great!
I've left some nits on the docs and logger messages, but otherwise this LGTM. Can you confirm the slow tests pass?
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
b5fc1aa to
57acb7e
Compare
lewtun
left a comment
There was a problem hiding this comment.
Thanks for iterating @michaelbenayoun !
I've left 2 nits and a suggestion about using logger.warning() instead of the warning package
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
…0529) * Change transformers.onnx to use optimum.exporters.onnx * Update doc * Remove print * Fix transformers.onnx cli * Update documentation * Update documentation * Small fixes * Fix log message * Apply suggestions * Update src/transformers/onnx/__main__.py Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> * Apply suggestions * Add missing line break * Ran make fix-copies * Update src/transformers/onnx/__main__.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> * Update src/transformers/onnx/__main__.py Co-authored-by: lewtun <lewis.c.tunstall@gmail.com> Co-authored-by: Michael Benayoun <michael@huggingface.co> Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com> Co-authored-by: lewtun <lewis.c.tunstall@gmail.com>
What does this PR do?
As the title say. The
transformers.onnxcommand-line tool now uses theoptimum.exporters.onnxcommand-line tool in the background, and redirects the user to use this tool directly for the next times (same in the documentation).